package multidraw.tools;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Icon;

import multidraw.model.DrawingCanvasModel;



public class ToolController extends AbstractAction {
	protected DrawingCanvasModel model;
	protected Tool tool;
	
	public ToolController(String name, Icon icon, String tip,
			DrawingCanvasModel model, Tool t) {
		super(name, icon);
		this.model = model;
		this.tool = t;
	}
	
	public void actionPerformed(ActionEvent e) {
		model.setCurrentTool(tool);
	}
}
